package com.chennan.common.threadpool;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

/**
 * @author chennan
 * @create 2021-07
 */
@Configuration
public class ThreadPoolConfig {

    //自定义线程池
    @Bean("customsThreadPool")
    public Executor getThreadPool(){
        return Executors.newFixedThreadPool(5);
    }

}
